#async await
Explore tagged Tumblr posts
vash3r · 6 years ago
Text
@unittest.skip class DeadlockExample(AsyncTestCase): """ Example of how deadlock can occur. Make sure your test dependencies don't contain cycles! ;) """ @UnittestAsyncTest async def test1(self): print("starting test1 async") await self.test2 print("done test1 async") @UnittestAsyncTest async def test2(self): print("starting test2 async") await self.test1 print("done test2 async")
It Just Works(tm)
(The solution was to forget about inheritance and just write the magic methods myself while avoiding __get__ at all costs)
5 notes · View notes
mentalisttraceur-software · 4 years ago
Text
Explicit Lazy Evaluation
async/await, lazy/eval
Some languages implement async functions so that the function only starts executing once you call await on its return value. I eventually realized we can use that to write explicitly lazily evaluated code. I'd even go so far as to say that this may be an acceptable use of async/await if you actually need lazy evaluation, because
lazy evaluation is a kind of asynchronous execution, and
much like concurrency, it is the caller's business.
This is probably not ideal. Lazy evaluation and concurrency are conceptually different, and imply different possibilities that you need to worry about. So an implementation that conflates them risks human error and confusion. But it gave me the idea for another pair of keywords, maybe lazy/eval, to do explicit lazy evaluation.
3 notes · View notes
gbhbl · 1 year ago
Text
EP Review: Async Await - Irretrospective: Part 3 (Chameleons Risen)
Last, but not least, it’s Irretrospective Part 3. The final entry in this trilogy of EPs from Async Await.
Async Await’s charismatic, genre mixing EP collection concludes with Irretrospective: Part 3. Releasing on the 19th January 2024 via Chameleons Risen, the third offering from this series sees a shift as thematically the EP explores self-reflection and improvement. Project mastermind Mike Sorensen comments: Irretrospective Part 3 is the final installment of the Irretrospective series of EPs and…
Tumblr media
View On WordPress
0 notes
azcode · 4 years ago
Link
0 notes
geekmusthave · 6 years ago
Text
Promises in Javascript: A Complete Guide for 2019
Promises in Javascript: A Complete Guide for 2019
via Promises in Javascript: A Complete Guide for 2019 — DZone Web Dev Zone Don’t let your program down! Promises are an important concept that is essential for a JavaScript developer to understand. If this concept is clear, the developer can utilize promises in a variety of ways in their day-to-day lives. There are a lot of articles and tutorials available on the web about promises. However,…
View On WordPress
0 notes
vash3r · 6 years ago
Text
got deadlock detection working in an hour pretty easily with a wait-for graph (helps that i’ve done this in C before), but the issue is that since it has to be fired in __await__ you either have to monkey-patch asyncio.Task or ensure you wrap every single coroutine you ever call in your [sub]class if you want complete coverage
actually a much better solution would be to use a custom event loop class if that’s allowed
1 note · View note
vash3r · 6 years ago
Text
cursed by __get__ magic to never get an instance
1 note · View note
gbhbl · 2 years ago
Text
Interview: Async Await aka Mike Sorensen (Video/Audio)
We spoke to multi-instrumentalist Mike Sorensen aka Async Await about the new EP, the plan for the three-parts, looking back while also moving forward, and so much more.
Alternative rock project Async Await will unleash Irretrospective Part 1, the first of a trio of EPs, on the 15th of September 2023 via Chameleons Risen. A dynamic blend of alternative rock, electronica, and distortion, Async Await showcases a varied sound across the four tracks that make up this EP. Read our full review here. We spoke to multi-instrumentalist Mike Sorensen aka Async Await…
Tumblr media
View On WordPress
0 notes
gbhbl · 2 years ago
Text
EP Review: Async Await - Irretrospective Part 1 (Chameleons Risen)
A dynamic blend of alternative rock, electronica, and distortion, Async Await showcases a varied sound across the four tracks that make up this EP.
Alternative rock project Async Await will unleash Irretrospective Part 1, the first of a trio of EPs, on the 15th of September 2023 via Chameleons Risen. Project mastermind Mike Sorensen comments: Irretrospective Part 1 is the first of a three part series of EPs that comprise a reflection on my past and personal life. Part 1 deals with feelings of isolation, intrusive thoughts, helplessness and…
Tumblr media
View On WordPress
0 notes